package commands;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import org.bukkit.permissions.Permission;

import persistence.IPermissiable;

public class Commandtpa implements ICommand, IPermissiable {

	CCommandHandler handler;
	final static String CONST_COMMAND_NAME = "tpa";
	public HashMap<Player, Player> request = new HashMap<Player, Player>();
	public HashMap<Player, Number> ticks = new	HashMap<Player, Number>();
	final static String CONST_PERM_STRING = "bcommand.tpa";
	final static List<Permission> CONST_PERM_TPA = Arrays.asList(new Permission(CONST_PERM_STRING));
	
	public Commandtpa(CCommandHandler l) {
		handler = l;
	}
	
	@Override
	public String getCommandName() {
		return CONST_COMMAND_NAME;
	}

	@Override
	public boolean isCommandAccepted(String cmd) {
		return CONST_COMMAND_NAME.equals(cmd);
	}

	@Override
	public boolean exec(CommandSender sender, String[] args) {
		
		return false;
	}

	@Override
	public boolean checkSender(CommandSender sender) {
		for(Permission p : CONST_PERM_TPA)
		{
			if(!sender.hasPermission(p)) return false;
		}
		return true;
	}

	@Override
	public List<Permission> getPermList() {
		return CONST_PERM_TPA;
	}

}
